Memory management for unifying memory cell conditions by using maximum time intervals

ABSTRACT

A method includes accepting data for storage in a memory that is partitioned into multiple memory regions. A memory region is selected for storing the data. At least part of the data is stored in the selected memory region, subject to verifying that all the storage operations applied to the selected memory region are performed within a predefined maximum time interval.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims the benefit of U.S. Provisional Patent Application 61/386,633, filed Sep. 27, 2010, whose disclosure is incorporated herein by reference.

FIELD OF THE INVENTION

The present invention relates generally to memory systems, and particularly to methods and systems for managing data storage in memory devices.

BACKGROUND OF THE INVENTION

Various techniques for managing the storage of data in memory devices, such as Flash devices, are known in the art. For example, U.S. Patent Application Publication 2008/0270730 (now U.S. Pat. No. 8,332,574), whose disclosure is incorporated herein by reference, describes a method for efficient storage of metadata in Flash memory. User data is stored in a memory that includes one or more blocks of pages. The data is stored by, for one of the blocks and optionally for all 20 of the blocks, whenever writing any of the user data to that block, writing the block according to a predefined plan for specifying, with respect to each page of that block, a portion of the user data that is to be written to that page. Alternatively or additionally, each page 25 that stores user data has associated therewith metadata related to the age of the user data stored therein. For one of the blocks, at any time that two or more of the pages of that block store user data, a common value of the metadata is associated with all such pages.

As another example, U.S. Patent Application Publication 2010/0131697, whose disclosure is incorporated herein by reference, describes methods for tag-grouping of blocks in storage devices. In some embodiments, data is received for storage in a memory that includes at least three blocks, wherein each block, for storing the data, has at least one metadata value, associated with each block, which is dependent upon a writing time of each block. At least three blocks are grouped into at least two block groups, wherein at least one block group contains at least two blocks. A respective metadata value is associated with each block group. The respective metadata value of a respective block group is associated with each block storing the data contained in the respective block group, without storing a dedicated copy of at least one metadata value for each block.

SUMMARY OF THE INVENTION

An embodiment of the present invention that is described hereinbelow provides a method including accepting data for storage in a memory that is partitioned into multiple memory regions. A memory region is selected for storing the data. At least part of the data is stored in the selected memory region, subject to verifying that all the storage operations applied to the selected memory region are performed within a predefined maximum time interval.

In some embodiments, storage of the data in the selected memory region is terminated upon detecting that the predefined maximum time interval ends. In an embodiment, when a remaining portion of the data is still pending for storage after the storage in the selected memory region is terminated, the method includes choosing another memory region for storing the remaining portion. In a disclosed embodiment, the selected memory region still includes storage space that is available for storage when the storage in the selected memory region is terminated. In an embodiment, the method includes storing other data in the available storage space of the selected memory region before the predefined maximum time interval ends.

In another embodiment, each memory region includes multiple memory pages, and the method includes calculating and storing for each memory region a single respective storage parameter that is applicable to all the memory pages in the memory region. In an embodiment, each memory page includes analog memory cells, and calculating the storage parameter includes defining a respective set of read thresholds for reading the analog memory cells in the region.

In another embodiment, calculating the storage parameter includes computing the storage parameter based on only a partial subset of the memory pages in the region. In an example embodiment, the partial subset includes a single memory page. In some embodiments, verifying that the storage operations are performed within the maximum time interval includes initiating a timing mechanism when beginning to store the data, and terminating the storage when the timing mechanism expires.

There is additionally provided, in accordance with an embodiment of the present invention, apparatus including an interface and storage circuitry. The interface is configured to accept data for storage in a memory that is partitioned into multiple memory regions. The storage circuitry is configured to select a memory region for storing the data, and to store at least part of the data in the selected memory region subject to verifying that all the storage operations applied to the selected memory region are performed within a predefined maximum time interval.

There is also provided, in accordance with an embodiment of the present invention, apparatus including a memory and storage circuitry. The memory is partitioned into multiple memory regions. The storage circuitry is configured to select a memory region for storing data in the memory, and to store at least part of the data in the selected memory region subject to verifying that all the storage operations applied to the selected memory region are performed within a predefined maximum time interval.

The present invention will be more fully understood from the following detailed description of the embodiments thereof, taken together with the drawings in which:

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram that schematically illustrates a memory system, in accordance with an embodiment of the present invention; and

FIG. 2 is a flow chart that schematically illustrates a method for data storage, in accordance with an embodiment of the present invention.

DETAILED DESCRIPTION OF EMBODIMENTS Overview

Data is typically stored in analog memory cells, such as Flash cells, by programming the memory cells with analog values that represent the data. The data is typically retrieved by comparing the analog values of the memory cells to certain read thresholds. In practical memory devices, however, the analog values of the memory cells may vary from the originally-stored values over time. These variations may be caused, for example, by leakage of electrical charge from the memory cells, by temperature variations or by other distortion mechanisms. Unless accounted for, analog value variations of this sort may degrade the readout performance of the memory device considerably. In many practical cases, the impairments that distort the analog values of the memory cells depend on the time that elapsed since the memory cells were last programmed.

Embodiments of the present invention that are described herein provide improved methods and systems for managing data storage in memory devices. The disclosed techniques simplify the management and reduce the memory overhead needed for compensating for the above-described variations in analog values.

In some embodiments, a memory is partitioned into memory regions, each memory region comprising multiple memory pages. The disclosed techniques ensure that all the pages in a given memory region are written within a predefined maximum time interval, i.e., at approximately the same time. When enforcing this condition, the different memory cells in the region are subject to similar analog value variation effects. As a result, the different pages in the region can be characterized and managed using a single set of parameters, instead of having to characterize and manage each individual page separately. Moreover, the disclosed techniques make it possible to characterize and manage the entire region by analyzing only a single page or a small number of pages, since the analog value variations in each page are indicative of the variations in the other pages.

In one example embodiment, a single set of read thresholds is computed for all the pages in the region. In another example embodiment, a single health level parameter is computed for the entire region. Such computations may be carried out by tracking or otherwise processing the analog values of a single page or of a small number of pages. Since the disclosed techniques characterize and manage the analog value variations per region instead of per page, they enable considerable reduction in the memory space and the computational complexity needed for such tasks.

System Description

FIG. 1 is a block diagram that schematically illustrates a memory system 20, in accordance with an embodiment of the present invention. System 20 can be used in various host systems and devices, such as in computing devices, cellular phones or other communication terminals, removable memory modules (sometimes referred to as “Flash drives”), Solid State Disks (SSD), digital cameras, music and other media players and/or any other system or device in which data is stored and retrieved.

System 20 comprises a memory controller 24, which stores data in a memory device 28 on behalf of a host 32. In the present example, memory device 28 comprises a Flash device. The memory device comprises multiple memory blocks 36. Each memory block 36 comprises multiple memory pages 40, i.e., groups of memory cells that are programmed and read simultaneously. The memory device comprises an interface 44 for communicating with memory controller 24, and a dispatcher 48 for sending data for storage in the appropriate memory blocks as instructed by the memory controller.

Each memory block 36 comprises multiple analog memory cells, in the present example NAND Flash cells. In the present context, the term “analog memory cell” is used to describe any memory cell that holds a continuous, analog value of a physical parameter, such as an electrical voltage or charge. The analog memory cells may comprise for example, NAND, NOR or Charge Trap Flash (CTF) Flash cells, phase change RAM (PRAM, also referred to as Phase Change Memory—PCM), Nitride Read Only Memory (NROM), Ferroelectric RAM (FRAM), magnetic RAM (MRAM) or Dynamic RAM (DRAM) cells, or any other suitable type of analog memory cells. Although the embodiments described herein refer mainly to analog memory, the disclosed techniques may also be used with various other memory types.

The charge levels stored in the cells and/or the analog voltages or currents written into and read out of the cells are referred to herein collectively as analog values, storage values or analog storage values. Although the embodiments described herein mainly address threshold voltages, the methods and systems described herein may be used with any other suitable kind of analog values.

System 20 stores data in the analog memory cells by programming the cells to assume respective memory states, which are also referred to as programming states or programming levels. The programming levels are selected from a finite set of possible levels, and each level corresponds to a certain nominal storage value. For example, a 2 bit/cell MLC can be programmed to assume one of four possible programming levels by writing one of four possible nominal storage values into the cell. Memory device 28 typically converts the data for storage into analog values, and writes the analog values into the memory cells of blocks 36. Typically, memory device 28 erases the memory cells of each block 36 simultaneously, upon receiving an erase command from the memory controller.

Memory controller 24 comprises a host interface 52 for communicating with host 32, a processor 56 that carries out part or all of the disclosed techniques, and a memory interface for communicating with memory device 28. In the present example, processor 56 comprises a block management unit 64 and a block health monitor 68, whose functions are described in detail below. In the embodiment of FIG. 1, the disclosed techniques are carried out by processor 56 in the memory controller. In alternative embodiments, however, the disclosed techniques can be carried out using suitable circuitry that is embodied in the memory controller, in the memory device, or both. The circuitry that carries out the disclosed techniques is referred to herein as storage circuitry, regardless of its location.

Memory controller 24 may be implemented in hardware, e.g., using one or more Application-Specific Integrated Circuits (ASICs) or Field-Programmable Gate Arrays (FPGAs). Alternatively, the memory controller may comprise a microprocessor that runs suitable software, or a combination of hardware and software elements.

The configuration of FIG. 1 is an example system configuration, which is shown purely for the sake of conceptual clarity. Any other suitable memory system configuration can also be used. For example, although the example of FIG. 1 shows a single memory device, in alternative embodiments memory controller 24 may control multiple memory devices 28. Elements that are not necessary for understanding the principles of the present invention, such as various interfaces, addressing circuits, timing and sequencing circuits and debugging circuits, have been omitted from the figure for clarity.

In the example system configuration shown in FIG. 1, memory device 28 and memory controller 24 are implemented as two separate Integrated Circuits (ICs). In alternative embodiments, however, the memory device and the memory controller may be integrated on separate semiconductor dies in a single Multi-Chip Package (MCP) or System on Chip (SoC), and may be interconnected by an internal bus. Further alternatively, some or all of the memory controller circuitry may reside on the same die on which the memory array is disposed. Further alternatively, some or all of the functionality of memory controller 24 can be implemented in software and carried out by a processor or other element of the host system. In some embodiments, host 32 and memory controller 24 may be fabricated on the same die, or on separate dies in the same device package.

In some embodiments, memory controller 24 comprises a general-purpose processor, which is programmed in software to carry out the functions described herein. The software may be downloaded to the processor in electronic form, over a network, for example, or it may, alternatively or additionally, be provided and/or stored on non-transitory tangible media, such as magnetic, optical, or electronic memory.

Storage Management for Unifying Memory Cell Conditions Per Memory Block

In practical memory devices, as explained above, various impairments that distort the analog values (e.g., threshold voltages) of the memory cells depend on the time that elapsed since the memory cells were last programmed. Thus, in some embodiments, memory controller 24 manages the data storage such that the pages of each block 36 are programmed within a predefined maximum time interval, i.e., at approximately the same time. In other words, the memory controller stores the data such that all the write operations to a given block 36 are performed during the predefined maximum time interval.

When using this sort of management, all the pages in a given block are subjected to similar analog value variations, and can therefore be characterized jointly by a small number of parameters (e.g., read thresholds).

In an example embodiment, the predefined maximum time interval is on the order of two hours. In alternative embodiments, however, any other suitable time interval can be used. In an example implementation, block management unit 64 selects a certain block 36 for storing data that is received from host 32. Block health monitor 68 maintains a respective timing mechanism for each block that is currently used for storage. When unit 64 begins to store data in a given block, monitor 68 initiates the timing mechanism of this block. When the timing mechanism expires, monitor 68 instructs unit 64 to terminate storing data in this block.

Monitor 68 may use any suitable type of timing mechanism for measuring the maximum time interval. In one example embodiment, monitor 68 records a time stamp indicating the time at which the first programming operation was applied to the block. When preparing to write a new page to that block, monitor 68 compares the current time to the recorded time stamp, and allows the new page to be written only if the difference between them does not exceed the maximum time interval. In another example embodiment, upon performing the first programming operation in the block, monitor 68 initiates a (hardware or software) timer that measures the maximum time interval. In this embodiment, monitor 68 allows write operations to be applied to the block as long as the timer does not expire.

Typically, unit 64 terminates storage in the block regardless of whether the block still has pages that are available for storage. In other words, in some cases unit 64 terminates storage in the block even though the block is not full. This termination ensures that the pages in the block are all written during the predefined maximum time interval. In some embodiments, the remaining pages in the block are left unused. In these embodiments, some memory space is wasted in return for efficient management. In alternative embodiments, unit 64 stores other data in one or more of the remaining pages, before the predefined maximum period expires, so as to reduce wasting of memory.

Typically, unit 64 terminates storage in the block regardless of whether the data from the host is fully stored or not. In other words, in some cases unit 64 closes the block even though some data from the host is not yet stored. In some embodiments, unit 64 chooses another block and stores the remaining data in that block.

FIG. 2 is a flow chart that schematically illustrates a method for data storage, in accordance with an embodiment of the present invention. The method begins with memory controller 24 accepting data for storage from host 32 via interface 52, at a data input step 70. Block management unit 64 selects a certain block 60 for storing the data, at a block selection step 74. Typically, memory controller 24 may maintain one or more blocks that are open for writing at a given point in time.

If the selected block is newly-selected, i.e., about to be written for the first time since it was last erased, monitor 68 initiates a respective timer (or other timing mechanism) for the selected block, for measuring the predefined maximum time interval, at a timer initiation step 78.

Unit 64 stores a page of data in the selected block, at a page storage step 82. Unit 64 then checks whether all the data has been stored, at a first checking step 86. If all the data accepted from the host has been stored, the method terminates, at a termination step 90.

Otherwise, unit 64 checks whether the block is full and monitor 68 checks whether the timer of the block has expired, at a second checking step 94. If none of these conditions is met, the method loops back to step 82 above, for storing the next page of data in the selected block. If, on the other hand, the block is full or the timer of the block is expired (i.e., the predefined maximum time period ends), unit 98 closes the block. The method then loops back to step 74 above, in which unit 64 chooses another block for continuing storing the data.

As can be appreciated, step 94 above ensures that the block is closed for further write operations when the time since the first write operation to the block reaches the predefined maximum time interval ends. In other words, the condition ensures that all the write operations to the block are performed during the predefined maximum time interval.

The flow of FIG. 2 is an example flow, which is chosen for the sake of conceptual clarity. In alternative embodiments, any other suitable flow can be used. The example of FIG. 2 refers to a single block that is open for storage at a given time, for the sake of clarity. In alternative embodiments, memory controller 24 may maintain two or more blocks 36 that are used for storage concurrently. In these embodiments, monitor 68 runs multiple timers simultaneously, one timer for each open block.

In the embodiments described herein, memory controller 24 ensures that the write operations in each memory block 36 are performed during a predefined maximum time interval. The disclosed techniques, however, are in no way limited to memory block units. In alternative embodiments, the memory controller may partition the memory space of device 28 into memory regions of any desired size, and apply the above-described condition to these memory regions. Each memory region may comprise, for example, a part of a memory block or a number of memory blocks. In one example embodiment, device 24 is partitioned into 1000 memory regions. Generally, however, any suitable number of memory regions can be used.

The above-described management technique enables considerable improvement in management efficiency and overhead. Since all the pages in a given block 36 are programmed at approximately the same time, they are subjected to similar analog value variations. Therefore, the block can be characterized using a single set of storage parameters that are applicable to all the pages in the block.

In some embodiments, memory controller 24 calculates the single set of storage parameters and stores it for subsequent use. Memory controller 24 may store the sets of storage parameters of the various blocks in any suitable location, such as in device 28 or in an internal memory of the memory controller. Since the storage parameters are calculated and stored per block and not per each individual page, both computational complexity and storage space are reduced considerably.

Memory controller 24 may calculate and store various kinds of storage parameters indicative of the block. In some embodiments, the storage parameters comprise a respective set of read thresholds for reading the analog values from the memory cells of the block. Since all the pages of a given block are subject to similar analog value drift, it is often possible for the memory controller to read any of the pages of the block using the same set of read thresholds. As another example, the storage parameters may comprise a health level parameter that is indicative of the health level of the various pages in the block. In alternative embodiments, any other suitable storage parameters, such as the number of programming and erasure cycles applied to the block or the aggregate activity time of the block, can be calculated and stored by the memory controller per block.

Furthermore, since all the pages in a given block are written approximately at the same time, the characteristics of any single page (or small group of pages) are indicative of the block as a whole. Therefore, memory controller 24 may estimate the above-described storage parameters (e.g., read thresholds) by processing only a single page or a small partial subset of the pages in the block. This feature provides an additional reduction in computational complexity.

It will thus be appreciated that the embodiments described above are cited by way of example, and that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof which would occur to persons skilled in the art upon reading the foregoing description and which are not disclosed in the prior art. Documents incorporated by reference in the present patent application are to be considered an integral part of the application except that to the extent any terms are defined in these incorporated documents in a manner that conflicts with the definitions made explicitly or implicitly in the present specification, only the definitions in the present specification should be considered. 

The invention claimed is:
 1. A method, comprising: accepting data for storage in a memory device, wherein the memory device is partitioned into a plurality of memory regions and wherein each memory region is partitioned into a plurality of memory pages; selecting a given memory region; storing a first part of the data in a first memory page of the given memory region, wherein storing the first part of the data includes performing at least a first write operation on the first memory page; recording a time stamp, wherein the time stamp is indicative of a time when the at least first write operation is applied to the first memory page; storing a second part of the data in a second memory page of the given memory region responsive to determining that a difference between a current time and the time stamp is less than a predefined maximum time interval; and closing the given memory region to additional write operations upon detecting that the predefined maximum time interval has expired since storing the first part of the data, wherein the given memory region includes storage space that is available for storage when closed.
 2. The method according to claim 1, further comprising, when a remaining portion of the data is still pending for storage after the given memory region is closed to the additional write operations, storing the remaining portion of the data in another memory region different from the given memory region.
 3. The method according to claim 1, further comprising storing other data in the available storage space of the given memory region before the predefined maximum time interval has expired since storing the first part of the data.
 4. The method according to claim 1, further comprising: calculating a respective set of storage parameters that are applicable to all the memory pages in the given memory region; and storing the respective set of storage parameters in the memory device.
 5. The method according to claim 4, wherein the memory device comprises non-volatile memory cells, and wherein calculating the respective set of storage parameters comprises defining a set of read threshold voltages for reading the non-volatile memory cells in the given memory region.
 6. The method according to claim 4, wherein calculating the respective set of storage parameters comprises computing the set of storage parameters based on only a partial subset of the plurality of memory pages in the given memory region.
 7. The method according to claim 6, wherein the partial subset comprises a single memory page.
 8. An apparatus, comprising: an interface configured to accept data for storage in a memory device wherein the memory device is partitioned into a plurality of memory regions and wherein each memory region is partitioned into a plurality of memory pages; a timer configured to measure a predefined maximum time interval; and storage circuitry configured to: select a given memory region; perform at least a first programming operation to store a first part of the data in a first memory page of the given memory region; start the timer at a time corresponding to performing the at least first programming operation; store a second part of the data in a second memory page of the given memory region responsive to a determination that the timer; and close the given memory region to additional write operations upon detecting that the timer has expired, wherein the given memory region includes storage space that is available for storage when closed.
 9. The apparatus according to claim 8, wherein, when a remaining portion of the data is still pending for storage after the given memory region is closed to the additional write operations, the storage circuitry is further configured to store the remaining portion of the data in another memory region.
 10. The apparatus according to claim 8, wherein the storage circuitry is further configured to store other data in the available storage space of the given memory region before the timer expires.
 11. The apparatus according to claim 8, wherein the storage circuitry is further configured to: calculate a respective set of storage parameters that are applicable to all the memory pages in the given memory region; and store the respective set of storage parameters in the memory device.
 12. The apparatus according to claim 11, wherein the memory device comprises non-volatile memory cells, and wherein the respective set of storage parameters comprises a set of read threshold voltages for reading the non-volatile memory cells in the given memory region.
 13. The apparatus according to claim 11, wherein the storage circuitry is configured to calculate the respective set of storage parameters based on only a partial subset of the plurality of memory pages in the given memory region.
 14. The apparatus according to claim 13, wherein the partial subset comprises a single memory page.
 15. An apparatus, comprising: a memory device, which is partitioned into a plurality of memory regions, wherein each memory region is partitioned into a plurality of memory pages; and storage circuitry configured to: accept data for storage in the memory device; select a given memory region; perform at least a first programming operation to store a first part of the data in a first memory page of the given memory region; record a time stamp, wherein the time stamp is indicative of a time when the at least first programming operation is applied to the first memory page; compare a current time to the recorded time stamp; store a second part of the data in a second memory page of the given memory region responsive to a determination that a difference in time between the current time and the recorded time stamp is less than a predefined maximum time interval; and close the given memory region to additional write operations upon detecting that the predefined maximum time interval has expired since storing the first part of the data, wherein the given memory region includes storage space that is available for storage when closed.
 16. The apparatus according to claim 15, wherein, when a remaining portion of the data is still pending for storage after the given memory region is closed to the additional write operations, the storage circuitry is further configured to perform at least a third write operation in another memory region for storing the remaining portion of the data.
 17. The apparatus according to claim 15, wherein, the storage circuitry is further configured to store other data in the given memory region in the storage space that is available for storage before the predefined maximum time interval has expired since storing the first part of the data. 